package com.isky.visual.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.isky.visual.proj.entity.PanelGroup;
import com.isky.visual.proj.mapper.PanelGroupMapper;
import com.isky.visual.system.entity.SystemConfiguration;
import com.isky.visual.system.mapper.SystemConfigurationMapper;
import com.isky.visual.system.service.ISystemConfigService;
import org.springframework.stereotype.Service;

/**
 * @author wenjs
 */
@Service
public class SystemConfigServiceImpl  extends ServiceImpl<SystemConfigurationMapper, SystemConfiguration> implements ISystemConfigService {

    @Override
    public SystemConfiguration getByCode(String code) {
        QueryWrapper<SystemConfiguration> queryObject = new QueryWrapper<>();
        SystemConfiguration systemConfiguration = new SystemConfiguration();
        systemConfiguration.setValid(true);
        systemConfiguration.setCode(code);
        queryObject.setEntity(systemConfiguration);

        return this.baseMapper.selectOne(queryObject);
    }
}
